/*
 * Message.h
 *
 *  Created on: Apr 9, 2011
 *      Author: pablo
 */

#ifndef MESSAGE_H_
#define MESSAGE_H_
#define TEXTO_SIZE 255
#define PID 0
#define CHAT 1
#define ROOM_REQUEST 2
#define ROOM_LIST 3
#define EXIT 4
#define JOIN_ROOM 5
#define NEW_ROOM 6
#define CLIENT_NAME 7

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>

using namespace std;

namespace common {
/*
 * Representa un mensaje enviado o recibido entre los procesos.
 */

typedef struct messageType {
	long mtype;
	int pid;
    int room;
	char* texto;
} messageType;

class Message {

private:

	struct messageType message;
	int pid;
	string description;
	string roomRequest;
	string activeRoomListRequest;
	string exitRequest;
	string joinRoomRequest;
	string newRoomRequest;
	string nameOfClient;


public:

	Message();
	virtual ~Message();
	string getDescription();
	void setDescription(string description);
    void crearMensajePid(int pid, int room,char* texto);


};






}

#endif /* MESSAGE_H_ */
